Repository navigation
A reopened change and a later alert recovery reach their waiting runs at once - #986
Merged
Merged
Conversation
… at once A run stopped because the change it built on closed now goes back to waiting as soon as GitHub reports the change reopened, not at the 15-minute sweep. The pull request handler sends the team's change check for a close or a reopen before any return a reopen reaches, naming the change, and the worker reads the runs that change's close stopped (the sweep stays the backstop for every team). A recovery posted after an alert route's quiet window now closes the run waiting on a person for that alert, through the same path a recovery posted at once uses (common::run_wake::alert_cleared, which the gateway's alert_delivery now calls too). Incident case xx_waits_never_outlive_their_event.
Contributor
|
Auto-merge |
coderhelm Bot
pushed a commit
that referenced
this pull request
Dec 5, 2026
* The org's pull requests in one answer: GET /api/prs/overview Every pull request in the team's repositories counts, people's, CoderHelm's and other bots'; CoderHelm's are one slice. Computed facts only, with thresholds from the scope's own percentiles, no rate on fewer than 10 events, and what isn't stored yet named in `missing`. No per-person ranking, count or duration; a login appears only as one item's owner. The summary's numbers are all facts. GET /api/prs takes the overview's drill-down (stage, past p85/p95). Incident case xz pins it. * Overview: clippy's shapes, and words without hand-off phrases or loose numbers The stability line says "over the last month" so every number in the summary is a fact; the incident case reads the route's source without whitespace, so formatting can't hide a read. * A reopened change and a later alert recovery reach their waiting runs at once (#986) A run stopped because the change it built on closed now goes back to waiting as soon as GitHub reports the change reopened, not at the 15-minute sweep. The pull request handler sends the team's change check for a close or a reopen before any return a reopen reaches, naming the change, and the worker reads the runs that change's close stopped (the sweep stays the backstop for every team). A recovery posted after an alert route's quiet window now closes the run waiting on a person for that alert, through the same path a recovery posted at once uses (common::run_wake::alert_cleared, which the gateway's alert_delivery now calls too). Incident case xx_waits_never_outlive_their_event.
nambok
added a commit
that referenced
this pull request
Dec 6, 2026
… gates and the new pull requests view (#985) * Every open pull request has a record and one state, read by the merge gates and the new pull requests view A durable record per open pull request in the team's connected repositories, written from the webhooks already received for every author and kept honest by a bounded GraphQL sync under the shared GitHub budget (sweep:dashboard_prs). One function (pr_needs::decide) decides each pull request's state, its turn and what it needs next from whom; the run's watch stores its standing and the reviewer's auto-merge gate merges only what it calls ready. GET /api/prs and GET /api/prs/detail serve the dashboard's pull requests page under the "view" capability. Incident case xw holds it. * Format the pull requests route * Keep each pull request's history, change log and nightly percentiles for the org overview Every duration starts at ready for review, and human review leaves out the author and every bot. Records keep their state and turn change log, people's reviews and review requests, and check transitions. A merged or closed pull request leaves a history row kept 400 days with its run and session links and revert and follow-up links. A nightly job writes each org's and repository's snapshot and percentiles, team-scoped and bounded. * Every pull request, whoever wrote it: history backfill and health signals A resumable 14-month backfill reads each organization's closed and merged pull requests into history under the shared budget, pausing on a held budget or rate limit and showing its progress per repository. Records keep separate author, reviewer and bot clocks, drift against the base, every check attempt (flaky reads as flaky), category and severity; history adds review coverage, bypass merges, suspect follow-ups with their reason, and CoderHelm's last run outcome and stop reason. * The org's pull requests in one answer: GET /api/prs/overview (#988) * The org's pull requests in one answer: GET /api/prs/overview Every pull request in the team's repositories counts, people's, CoderHelm's and other bots'; CoderHelm's are one slice. Computed facts only, with thresholds from the scope's own percentiles, no rate on fewer than 10 events, and what isn't stored yet named in `missing`. No per-person ranking, count or duration; a login appears only as one item's owner. The summary's numbers are all facts. GET /api/prs takes the overview's drill-down (stage, past p85/p95). Incident case xz pins it. * Overview: clippy's shapes, and words without hand-off phrases or loose numbers The stability line says "over the last month" so every number in the summary is a fact; the incident case reads the route's source without whitespace, so formatting can't hide a read. * A reopened change and a later alert recovery reach their waiting runs at once (#986) A run stopped because the change it built on closed now goes back to waiting as soon as GitHub reports the change reopened, not at the 15-minute sweep. The pull request handler sends the team's change check for a close or a reopen before any return a reopen reaches, naming the change, and the worker reads the runs that change's close stopped (the sweep stays the backstop for every team). A recovery posted after an alert route's quiet window now closes the run waiting on a person for that alert, through the same path a recovery posted at once uses (common::run_wake::alert_cleared, which the gateway's alert_delivery now calls too). Incident case xx_waits_never_outlive_their_event. * Answer the review: the gate never waits on what GitHub does not require, the sync never undoes events, history is never thinned The repository's approval rule is GitHub's own review decision and the team's rule is a person's approval; a review no rule requires is named, never a hold. The sync never reopens a closed record, yields to events newer than its read, replaces the reviews and requests it lists, and marks lists cut by their page size. History rows merge by source, so the backfill never thins a row written from events. The review decision is worked out at review events and used for bypass only when fresh. Stacks join within one repository, and the detail decides with the list's own linked records. * The sync writes each field only when its search was read after the last event that wrote it A page read before an event could undo that event's queue entry, auto-merge or review decision. Every field both events and the sync write (state, title, draft, head, base, labels, review requests, reviews, review decision, checks, mergeability, auto-merge, the merge queue, size) now keeps the time an event last wrote it, and the sync writes that field only when its read is newer. Tests cover a queue, an auto-merge and a review decision event landing after the read and surviving the page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two waits from #924 could outlast what they waited for. A run stopped because the change it built on closed was only taken back to waiting by the 15-minute sweep after the change was reopened. A recovery posted after an alert route's quiet window never closed the run waiting on a person for that alert. Both now reach the run as soon as the event happens.
Changes
gateway/routes/github_webhook.rs,worker/passes/change_wait.rs,common::change_wait): the pull request handler sends the team's change check for a close or a reopen (change_wait_check,event_moves_change) before any return a reopen reaches. Before this, a reopen went on to the review triggers and returned, and the check sent on a close never read stopped runs (check_closedran only in the sweep). The check message now names the pull request (repo,pr), and the worker'scheck_changereads that team's runs stopped by that change's close (moved_is). A reopen takes them back to waiting for the merge, and a merge sends them on. The 15-minute sweep still reads every team's stopped runs as the backstop.common::run_wake,worker/passes/alert_episodes.rs,gateway/routes/run_wake.rs): the close of a waiting alert run moved tocommon::run_wake::alert_cleared(withclose_cleared,newest_of_ticketandalert_ticket_id). The gateway'salert_deliverynow calls it for a recovery posted at once, and the worker's episode check calls it right afterpost_clearedwhen the quiet window ends. One path, no copy. An ALARM that arrives after the window still resumes the waiting run as before.xx_waits_never_outlive_their_eventwith its page.wznow asserts the new team-scopedcheck_closedcall.Verification
cargo fmt --all --check,rustfmt --check --edition 2021 worker/src/passes/incidents/*.rscargo clippy -p common -p worker -p gateway --all-targets -- -D warningscargo test -p common -p worker -p gateway(all pass)brand_spelling.py,domain_examples.pychange_wait::a_reopen_or_close_reaches_only_the_runs_of_that_change,github_webhook::change_wait_check_tests,run_wake::a_cleared_alert_closes_its_waiting_run_however_the_recovery_posts, and the twoxxcases.